from langchain_openai import OpenAIEmbeddings
from langchain_community.vectorstores import FAISS


def initialize_faiss_database(vector_data_dir_absolute_path):
    # openai embedding
    embeddings = OpenAIEmbeddings()

    vector_kb_object = FAISS.load_local(vector_data_dir_absolute_path, embeddings)

    return vector_kb_object
